TECClearConverterContextInfo
Resets a converter object to its initial state so it can be reused.
pascal OSStatus TECClearConverterContextInfo ( TECObjectRef encodingConverter);
encodingConverter
- The reference to the text encoding converter object whose context is to be cleared. This can be a reference returned by the function
TECCreateConverter
(page 91),TECCreateOneToManyConverter
(page 99), orTECCreateConverterFromPath
(page 92).- function result
- A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values.
DISCUSSION
Creating a converter object and obtaining a reference to it entails some overhead and expense. It is more economical to reuse an existing converter object than to create a new one containing the same conversion information. You use theTECClearConverterContextInfo
function to clear a converter object of any state and context information it contains and return it to its initial state. This does not, however, affect the source and destination encoding for which this converter object is intended to be used. If this function is unable to clear the context, it returns a result code passed through from one of the conversion plug-ins.If you are converting multiple segments of a text string, you should not clear the converter object until you have completely converted all the text segments.